from OpenGL.raw.GL.constants import GL_CULL_FACE
from OpenGL.raw.GL import glEnable
import math
# author = "Ronald"
# date   = 24-04-2010 07:29:02 PM

from OpenGL.GL import *
from OpenGL.GL import glScale
from OpenGL.GLU import *
from OpenGL.GLUT import *
from numpy import *
from leftArm import LeftArm
from rightArm import RightArm
from body import Body
from leg import Leg

class Surface(object):

    def __init__(self, size, position):
        self.size = size
        self.position = position


    def draw(self):

        glColor3f (0.0, 0.5, 0.0)
        glPushMatrix()
        glTranslatef (self.position[0], self.position[1], self.position[2])
        glutSolidCube(self.size)
        glPopMatrix()

        glColor3f (0.0, 0.5, 0.5)
        glPushMatrix()
        glTranslatef (self.position[0]+self.size*0.45, self.position[1]+self.size*0.55, self.position[2]+self.size*0.45)
        glutSolidCube(self.size/10)
        glPopMatrix()

        glColor3f (0.0, 0.5, 0.5)
        glPushMatrix()
        glTranslatef (self.position[0]+self.size*0.45, self.position[1]+self.size*0.55, self.position[2]-self.size*0.45)
        glutSolidCube(self.size/10)
        glPopMatrix()
        glColor3f (0.0, 0.5, 0.5)

        glPushMatrix()
        glTranslatef (self.position[0]-self.size*0.45, self.position[1]+self.size*0.55, self.position[2]+self.size*0.45)
        glutSolidCube(self.size/10)
        glPopMatrix()
        glColor3f (0.0, 0.5, 0.5)

        glPushMatrix()
        glTranslatef (self.position[0]-self.size*0.45, self.position[1]+self.size*0.55, self.position[2]-self.size*0.45)
        glutSolidCube(self.size/10)
        glPopMatrix()

        glColor3f (0.5, 0.5, 0.9)
        glDisable(GL_CULL_FACE)
        glPushMatrix()
        glTranslatef (self.position[0], self.position[1]+10, self.position[2])
        glutSolidCube(self.size)
        glEnable(GL_CULL_FACE)
        glPopMatrix()